package com.blue.core.excel;

import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author zhengjin
 * @since 1.0 2017年12月26日
 */
public class ExcelExporterMain
{
	public ExcelExporterMain()
	{
	}

	public static void main(String[] args) throws Exception
	{
		List<User> list = new ArrayList<>();
		list.add(new User(1, "blue1", "密码1", new Date(), 14));
		list.add(new User(2, "blue2blue2blue2blue2blue2", "密码2", new Date(), 16));

		try (FileOutputStream fos = new FileOutputStream("/opt/test.xls"))
		{
			ExcelExporter.export(User.class, list, fos);
		}
	}

}
